#!/bin/bash

export TOOL_CHAIN_PATH=
export CCROSS_PROFIX=

if [ ! -n "$1" ] ;then
    echo "######## build default!"
else
    echo "######## build $1"
fi

export CC=${CCROSS_PROFIX}gcc
export CXX=${CCROSS_PROFIX}g++
export LD=${CCROSS_PROFIX}ld
export STRIP=${CCROSS_PROFIX}strip
export AR=${CCROSS_PROFIX}ar

#export CFLAGS="-Wall -D_REENTRANT -D_GNU_SOURCE -DX64_SYS -O2"
export CFLAGS="-Wall -D_REENTRANT -D_GNU_SOURCE -I. -std=c99 -fPIE -O2"
export LDFLAGS="-L/usr/local/lib -lpthread -lcrypto -lm"

make $1

echo "...................Finish one............................"

